package cn.zs.supply.common.constants.enums;

/**
 * 公共错误码
 *
 * @Descripition: 错误代码定义规则：4位数字
 * 前2位的定义：
 * 00，98, 99表示系统占用。
 * 98 基础业务
 * 后续新的模块，请自行添加定义
 */
public enum PubErrCode implements ErrorCodeEnum {
    SUCCESS("0000", "执行成功"),
    APPID_MISSING("9800", "appId错误"),
    REQHEADER_MISSING("9801", "请求头参数缺失"),
    SIGN_MISMATCHING("9802", "签名验证失败"),
    NOT_LOGINED("9803", "用户未登录"),

    NO_PERMISSION("9804", "您的权限不足"),
    PARAM_ERROR("9805", "业务参数错误"),
    SERVICE_UNAVAILABLE("9806", "服务不可用"),
    REMOTE_INVOKE_ERROR("9807", "远程调用失败"),
    REMOTE_INVOKE_TIMEOUT("9808", "远程调用超时"),
    REMOTE_INVOKE_READTIMEOUT("9809", "远程调用读取超时"),
    FAIL_LOGINED("9811", "登录失败"),
    SUCCESS_LOGINED("9812", "登录成功"),
    EMPTY_DATA("9810", "空的数据集"),
    COMMON_ERROR("9999", "系统异常");

    private String code;

    private String msg;

    PubErrCode(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }

    @Override
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
